package com.example.forum.services;

import com.example.forum.model.Board;

import java.util.List;

public interface IBoardServices {

    /**
     * date: 2024/09/11 9:49<br/>
     * Description:
     * 查询num记录
     *
     * @param num 要查询的条数
     * @author: jmy <br/>
     */
    List<Board> selectByNum(Integer num);

    /**
     * date: 2024/09/11 16:17<br/>
     * Description: 更新板块中的帖子数量 articleCount +1
     *
     * @param id 板块id
     * @author: jmy <br/>
     */
    Integer addOneArticleCountById(Long id);


    /**
     * date: 2024/09/16 12:34<br/>
     * Description: 更新板块中的帖子数量 articleCount -1
     *
     * @author: jmy <br/>
     */
    Integer subOneArticleCountById(Long id);


    /**
     * date: 2024/09/12 21:02<br/>
     * Description: 通过板块id查询板块
     *
     * @author: jmy <br/>
     */
    Board selectByPrimaryKey(Long id);

    /**
     * date: 2024/09/16 10:46<br/>
     * Description: 跟新板块信息
     *
     * @author: jmy <br/>
     */
    Integer updateByPrimaryKeySelective(Board board);

}
